package com.java.web;

import com.java.dao.commDao;
import com.java.dao.commDaoImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author xyd
 * @Date 2021/12/23 22:58
 * @Version 1.0
 */
public class delCommServlet extends HttpServlet {

    private commDao commDao = new commDaoImpl();

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String cid = request.getParameter("cid");

        commDao.delComm(Integer.parseInt(cid));

        request.getRequestDispatcher(request.getContextPath() + "/listProduct").forward(request, response);

    }
}
